#### Start of system configuration section. ####

srcdir =	@srcdir@

ifeq ($(srcdir),.)
srcdir = ../../..
endif

VPATH :=	$(srcdir)

# Common prefix for machine-independent installed files.
prefix =	@prefix@

# Common prefix for machine-dependent installed files.
exec_prefix =	@exec_prefix@

bindir =	$(exec_prefix)/bin
libdir =	$(exec_prefix)/Sys/libs

INSTALL =	@INSTALL@
INSTALL_DATA =	@INSTALL_DATA@

CC =		@CC@

CFLAGS =	@CFLAGS@
LDFLAGS =	@LDFLAGS@

RANLIB =	@RANLIB@
AR =		ar

#### End system configuration section ####

FLAVOR_CFLAGS =	-m$(CPU) -m$(FPU) -f$(BASE)
OTHER_CFLAGS =	-fomit-frame-pointer
ALL_CFLAGS =	$(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(INCS)

INCS =		-nostdinc -I/gnu/os-include -I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
LIB =		libnet.a
SHELL =		/bin/sh

.c.o:
		$(CC) $(ALL_CFLAGS) -c $< -o $@

SRC =	big.c bigkey.c btree.c buf.c delete.c dynahash.c getgrent.c \
	gethostnamadr.c getlogin.c getnetbyaddr.c getnetbyname.c getnetent.c \
	getpass.c getproto.c getprotoent.c getprotoname.c getpwent.c \
	getservbyname.c getservbyport.c getservent.c getttyent.c getusershell.c \
	herror.c hfunc.c hsearch.c htonl.c htons.c inet_addr.c inet_lnaof.c \
	inet_makeaddr.c inet_netof.c inet_network.c inet_ntoa.c initgroups.c \
	insert.c log2.c lrucache.c lruhash.c lrutils.c ndbm.c ntohl.c ntohs.c \
	page.c rcmd.c res_comp.c res_debug.c res_init.c res_mkquery.c res_query.c \
	res_send.c search.c seq.c sethostent.c split.c storage.c syslog.c ttyname.c     ttyslot.c        updutils.c       utils.c

OBJ =	$(SRC:.c=.o)

libnet.a:	$(OBJ)
		rm -f $@
		$(AR) rv $@ $(OBJ)
		$(RANLIB) $@

clean:
		rm -rf *baserel

clobber:	clean
		rm -f Makefile

dep: $(SRC)
	$(CC) >deps -MM $(INCS) $(SRC)
    
#########################################################################
